﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Common;
using TeacherMS.View;

namespace TeacherMS
{
    public partial class FormMain : Form
    {
        private FormLogin formLogin=new FormLogin();
        
        public FormMain()
        {
            InitializeComponent();
        }

        private void FormMain_Load(object sender, EventArgs e)
        {
            var result=formLogin.ShowDialog();
            if (result != DialogResult.OK) this.Close();
            this.Text = $"教研室教学资料管理系统 - 当前用户：{AppData.CurrentUser.Name}";
            var indexView=new IndexView();
            indexView.Dock = DockStyle.Fill;
            Container.Controls.Add(indexView);
       
        }

        private void 系统设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void 帮助ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void 联系我们ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {

        }

        private void toolStripStatusLabel2_Click(object sender, EventArgs e)
        {

        }

        private void Comtainer_Paint(object sender, PaintEventArgs e)
        {

        }

        private void 班级设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Container.Controls.Clear();
            this.WindowState = FormWindowState.Maximized;
            var indexView = new ClassView();
            indexView.Dock = DockStyle.Fill;
            Container.Controls.Add(indexView);
        }

        private void 教学资料管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Container.Controls.Clear();
            this.WindowState = FormWindowState.Maximized;
            var indexView = new MaterialView();
            indexView.Dock = DockStyle.Fill;
            Container.Controls.Add(indexView);
        }
    }
}
